package com.woniu.service.impl;

import com.woniu.dao.CourseSectionDao;
import com.woniu.domain.CourseSection;
import com.woniu.service.CourseSectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseSectionServiceImpl implements CourseSectionService {
    @Autowired(required = false)
    CourseSectionDao courseSectionDao;
    @Override
    public List<CourseSection> getByCourseId(Integer courseId) {
        return courseSectionDao.getByCourseId(courseId);
    }


    @Override
    public List<CourseSection> getCourseSectionByCid(Integer courseId) {
        return courseSectionDao.getCourseSectionByCid(courseId);
    }


    @Override
    public int addCourseSection(List<CourseSection> courseSection) {
        return courseSectionDao.addCourseSection(courseSection);
    }

    @Override
    public List<CourseSection> getCourseSectionByChapter(List<String> chapters) {
        return courseSectionDao.getCourseSectionByChapter(chapters);
    }

}
